<?php
/*
 * @Author: yu_十三 13wl@sohu.com
 * @Date: 2024-11-27 18:50:50
 * @LastEditors: yu_十三 13wl@sohu.com
 * @LastEditTime: 2024-11-27 18:51:01
 * @FilePath: \web_ts\log_list.php
 * @Description: 
 * 
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved. 
 */

/**
 * 首页模板
 */
defined('EMLOG_ROOT') || exit('access denied!');
?>

<div class="main" role="main">
  <div class="container">
    <div class="main-content home-content">
      <div class="main-left">
        <div>
          <?php doAction('index_loglist_top')   ?>
        </div>
        <nav class="article-nav">
          <div class="article-nav-content">
            <a class="article-nav-item" href="javascript:;" target="_self" title="推荐">推荐</a>
            <a class="article-nav-item" href="javascript:;" target="_self" title="最新">最新</a>
            <span class="article-nav-line"></span>
          </div>
        </nav>
        <div class="article-skeleton ">
          <div class="article-skeleton-line"></div>
          <div class="article-skeleton-line"></div>
          <div class="article-skeleton-line"></div>
          <div class="article-skeleton-line"></div>
        </div>

        <div class="article-card-wrap hidden">


          <?php
          if (!empty($logs)) :
            foreach ($logs as $value) :
          ?>
              <article class="article-card" data-link="<?= $value['log_url'] ?>" itemscope="" itemtype="http://schema.org/BlogPosting">
                <a class="article-card-hidden-a" href="<?= $value['log_url'] ?>" itemprop="url"> <?= $value['log_title'] ?></a>
                <div class="article-card-head">
                  <span class="article-card-user" itemprop="author">
                    <span itemprop="name" rel="author"><?= author_name($value['author']) ?></span>
                  </span>
                  <time class="article-card-time" datetime="<?= date('Y-n-j', $value['date']) ?>" itemprop="datePublished"><?= date('Y-n-j', $value['date']) ?></time>
                  <span class="article-card-category">
                    <?= blog_sort($value['logid'])   ?>
                  </span>
                </div>
                <div class="article-card-body">
                  <div class="article-card-main">
                    <h2 class="article-card-title" itemprop="name headline"> <?= $value['log_title'] ?></h2>
                    <p class="article-card-desc" itemprop="articleBody">
                      <?= strip_tags($value['log_description'])  ?>
                    </p>
                    <div class="article-card-footer">
                      <div class="article-card-footer-left" itemprop="interactionCount">
                        <span class="article-card-footer-item">
                          <i class="iconfont icon-liulan article-card-footer-item-icon"></i>
                          <span><?= $value['views'] ?></span>
                        </span>
                        <span class="article-card-footer-item">
                          <i class="iconfont icon-dianzan article-card-footer-item-icon"></i>
                          <span>27</span>
                        </span>
                        <a class="article-card-footer-item comments" href="<?= $value['log_url'] ?>#comments" target="_blank" title="文章评论">
                          <i class="iconfont icon-pinglun article-card-footer-item-icon"></i>
                          <span><?= $value['comnum'] ?></span>
                        </a>
                      </div>
                      <div class="article-card-footer-right">
                        <?= log_tags($value['logid'])   ?>
                      </div>
                    </div>
                  </div>
                  <?php if (get_content_img($value['log_cover'], $value['content'])) : ?>
                    <div class="article-card-thumb">
                      <img class="article-card-thumb-img" src="<?= get_content_img($value['log_cover'], $value['content']) ?>" alt="<?= $value['log_title'] ?>" data-lazy="true">
                    </div>
                  <?php endif ?>
                </div>
              </article>

            <?php endforeach;
          else: ?>
            <div class="article-empty">
              <div class="article-empty-content">
                <span>列表为空</span>
              </div>
            </div>
          <?php endif ?>

        </div>

        <div class="comment-pagination">
          <ol class="page-navigator">
            <?= sheli_fy($lognum, $index_lognum, $page, $pageurl); ?>
          </ol>
        </div>


      </div>

      <div class="main-right">
        <?php include View::getView('side') ?>
      </div>
    </div>
  </div>
</div>
<?php include View::getView('footer') ?>